<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor. 
 */

/**
 * Description of DateToJsonFilter
 *
 * @author Virtualidad
 */
class DateToJsonFilter implements Filter {

    function filter($value, array $params = array()) {
        $result = null;

        if (!empty($value)) {
            $format = "d/m/Y";
            if (isset($params["format"])) {
                $format = $params["format"];
            }

            $result = MicrosoftDateFormatter::toJSON($value, $format);
        }

        return $result;
    }

}

?>
